package com.txw.serviceedu.service.impl;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.vod.model.v20170321.DeleteVideoRequest;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.txw.commonutils.R;
import com.txw.sercicebase.exceptionhandller.LingqiException;
import com.txw.serviceedu.entity.EduVideo;
import com.txw.serviceedu.mapper.EduVideoMapper;
import com.txw.serviceedu.service.EduVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.txw.vod.Utils.ConstanVodUtils;
import com.txw.vod.Utils.InitObject;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 课程视频 服务实现类
 * </p>
 *
 * @author TanXiongWei
 * @since 2021-11-28
 */
@Service
public class EduVideoServiceImpl extends ServiceImpl<EduVideoMapper, EduVideo> implements EduVideoService {

    /**
     * 根据课程ID删除小节
     *
     * @param courseId
     */
    @Override
    public void removeVideoByCourseId(String courseId) {
        QueryWrapper<EduVideo> wrapper = new QueryWrapper<>();
        wrapper.eq("course_id", courseId);
        baseMapper.delete(wrapper);
    }


}
